More particle optimisations Allaizn

Rseding's recent optimisations of the particle system (FFF-322) made particles much more lightweight than they were before, but it still left particles as rather complex beasts. A quick summary of the possible actions a particle can make during it's update:

  • Move their own position.
  • Advance their animation to another frame.
  • Land in water and apply a trigger.
  • Apply another trigger with a certain frequency.
  • Remove themselves from the game world once their life time ends.
What makes this complex is that triggers are general purpose systems that can do all kinds of things, including creating and destroying entities, fire, smoke and other particles as well as playing sounds or recursively applying even more triggers. In other words: applying a trigger is an "anything can happen" situation and thus totally unpredictable, which in turn makes optimisations extremely hard.

The particle emitter

The base game and most mods don't use particularly crazy tr...

Read more